<%-- 
    Document   : modBorVehiculo
    Created on : 01-sep-2009, 2:51:13
    Author     : Alberto
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" session="false" import="domain.*, planner.*, java.util.Iterator, java.util.Set, java.util.List, java.sql.Date"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>DOMECO</title>
        <link href="style.css" rel="stylesheet" type="text/css">


    </head>
    <body>

        <%if (request.getSession(false) != null) {%>
        <table align="center" width="1000" >
            <tr>
                <td>
                    <div id="menu" align="center"><jsp:include page="./menu principal.jsp"></jsp:include></div>
                    <br>

                    <p id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Modificar/Eliminar Vehiculos</span><br></p>
                    <span id="azulTitulo"> Vehiculos actuales</span>
                    <div id="general">
                        <div id="cuenta" align="center" >
                            <br>
                            <br>
                            <%
    Userdom user = (Userdom) request.getSession().getAttribute("user");
    List<Vehiclecar> list = new Operations().getListVehiclecar(user);
    String mark = null;
    boolean ocultar = false;
    if (list.isEmpty()) {
        ocultar = true;
                            %>
                            <br>
                            <br>
                            <p align=right"><span id="rojo"> Noy hay Cuentas</span></p>
                            <%} else {
                                Iterator it1 = list.iterator();
                                while (it1.hasNext()) {
                                    Vehiclecar b = (Vehiclecar) it1.next();
                                    Integer idContract = b.getIdCar();
                                    mark = b.getMark();

                            %>

                            <p align=center"> <span id="datosCuenta"> Nombre del Vehiculo: <%=mark%> </span> </p><p><a href="./Delete?type=vehiclecar&idVehiclecar=<%=idContract%>&redir=V"><img src="/Imagenes/eliminar.gif"></a>   <a href="./modificarCuenta.jsp?idC=<%=idContract%>"><img src="/Imagenes/modificar.gif"></a></p>
                            <br>
                            <%}
    }%>

                        </div>




                    <div id="abajo" align="center"><p>&copy;   Domeco &mdash; Proyecto Informatico A&ntilde;o 2009 </p></div>
                </td>
            </tr>
        </table>
        <%} else {%>
        <jsp:forward page="./index.jsp"></jsp:forward>
        <%}%>
    </body>
</html>
